<?php

/**
 * Calendar form base class.
 *
 * @package    alika
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseCalendarForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'           => new sfWidgetFormInputHidden(),
      'date'         => new sfWidgetFormDate(),
      'link'         => new sfWidgetFormTextarea(),
      'custom_int1'  => new sfWidgetFormInput(),
      'custom_int2'  => new sfWidgetFormInput(),
      'custom_char1' => new sfWidgetFormInput(),
      'custom_char2' => new sfWidgetFormInput(),
      'custom_date1' => new sfWidgetFormDate(),
      'custom_date2' => new sfWidgetFormDate(),
      'custom_bool1' => new sfWidgetFormInputCheckbox(),
      'custom_bool2' => new sfWidgetFormInputCheckbox(),
    ));

    $this->setValidators(array(
      'id'           => new sfValidatorPropelChoice(array('model' => 'Calendar', 'column' => 'id', 'required' => false)),
      'date'         => new sfValidatorDate(array('required' => false)),
      'link'         => new sfValidatorString(array('required' => false)),
      'custom_int1'  => new sfValidatorInteger(array('required' => false)),
      'custom_int2'  => new sfValidatorInteger(array('required' => false)),
      'custom_char1' => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'custom_char2' => new sfValidatorString(array('max_length' => 250, 'required' => false)),
      'custom_date1' => new sfValidatorDate(array('required' => false)),
      'custom_date2' => new sfValidatorDate(array('required' => false)),
      'custom_bool1' => new sfValidatorBoolean(array('required' => false)),
      'custom_bool2' => new sfValidatorBoolean(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('calendar[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Calendar';
  }


}
